package com.ruoyi.specific.service;

import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.specific.domain.bo.ImprovingUserPointsBo;
import com.ruoyi.specific.domain.vo.ImprovingUserPointsVo;

import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;

/**
 * 用户积分Service接口
 *
 * @author ruoyi
 * @date 2024-01-12
 */
public interface IImprovingUserPointsService {

    /**
     * 查询用户积分
     */
    ImprovingUserPointsVo queryById(Long userId);

    boolean checkUserPointsGreaterThanOrEqualTo(Long userId, BigDecimal points);

    boolean deductPointsByUserId(Long userId, BigDecimal points);

    /**
     * 查询用户积分
     */
    List<ImprovingUserPointsVo> queryByIds(Collection<Long> userIds);

    ImprovingUserPointsVo queryByUserName(String userName);

    /**
     * 查询用户积分列表
     */
    TableDataInfo<ImprovingUserPointsVo> queryPageList(ImprovingUserPointsBo bo, PageQuery pageQuery);

    /**
     * 查询用户积分列表
     */
    List<ImprovingUserPointsVo> queryList(ImprovingUserPointsBo bo);

    /**
     * 新增用户积分
     */
    Boolean insertByBo(ImprovingUserPointsBo bo);

    /**
     * 修改用户积分
     */
    Boolean updateByBo(ImprovingUserPointsBo bo);

    /**
     * 校验并批量删除用户积分信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
